<div class="page-header">
  <h1>Help</h1>
</div>

<h2>API</h2>

<table class="table">
  <thead>
    <tr>
      <th>URL</th>
      <th>Description</th>
      <th>Example</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>/api/v1/inventory/[inventory-key]</td>
      <td>ansible inventory (Ansible >= 1.0)</td>
      <td>curl "http://localhost:3000/api/v1/inventory/<strong>1234</strong>?token=[api-key]"
      </td>
    </tr>
    <tr>
      <td>/api/v2/inventory/[inventory-key]</td>
      <td>ansible inventory (Ansible >= 1.3)</td>
      <td>curl "http://localhost:3000/api/v1/inventory/<strong>1234</strong>?token=[api-key]"
      </td>
    </tr>
    <tr>
      <td>/api/v1/inventory/[inventory-key]/[host]</td>
      <td>hostvars (Ansible < 1.3)</td>
      <td>curl "http://localhost:3000/api/v1/inventory/[inventory-key]/<strong>localhost</strong>?token=[api-key]"</td>
    </tr>
  </tbody>
</table>

<h2>Inventory Plugin</h2>

Download the following inventory-plugin:
<ul>
  <li><%= link_to 'inventory-manager', '/download/inventory-manager' %></li>
  <li><%= link_to 'inventory-manager.ini', '/download/inventory-manager.ini' %></li>
</ul>

<h3>Usage</h3>
Get all hosts with ansible:
<pre>ansible all -i inventory-manager --list-hosts</pre>